//
//  SGInfomationVideoView.m
//  MomHelp
//
//  Created by xuguoyong on 16/8/22.
//  Copyright © 2016年 hudongkeji. All rights reserved.
//

#import "SGInfomationVideoView.h"

@interface SGInfomationVideoView ()
{
    //视频封面图
    UIImageView *_videoCoverImage;
    //播放按钮 play_video_button_image
    UIImageView *_playButton;
    //视频长度按钮
    UIButton *_videoTimeLong;

}

@end


@implementation SGInfomationVideoView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    _videoCoverImage = [[UIImageView alloc] init];
    _videoCoverImage.image = [UIImage imageNamed:@"1245101.jpg"];
    [self addSubview:_videoCoverImage];
    
    
    _playButton = [[UIImageView alloc] init];
    _playButton.image =[UIImage imageNamed:@"play_video_button_image"];
    _playButton.contentMode = UIViewContentModeCenter;
    _playButton.backgroundColor = [UIColor clearColor];
    [self addSubview:_playButton];
    
    _videoTimeLong = [UIButton custombuttonNormalStateWithTitile:@"18:09" titleFont:[UIFont systemFontOfSize:11.5] titleColor:[UIColor whiteColor] butttonImage:nil backgroundImage:[UIImage imageNamed:@"video_timelong_background_Image"] backgroundColor:nil clickThingTarget:nil action:nil];
    [self addSubview:_videoTimeLong];
}


-(void)layoutSubviews
{
    [super layoutSubviews];
    
    
    _videoCoverImage.sd_layout.spaceToSuperView(UIEdgeInsetsMake(0, 0, 0, 0));
    _playButton.sd_layout.spaceToSuperView(UIEdgeInsetsMake(0, 0, 0, 0));
    _videoTimeLong.sd_layout.rightSpaceToView(self,10).bottomSpaceToView(self,8).widthIs(50).heightIs(22.5);

}
@end
